package com.ruoyi.common.enums;

import com.ruoyi.common.utils.StringUtils;
import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 分类 模版类型 0 不共享 1共享
 *
 * @author lcx
 */
@Getter
@AllArgsConstructor
public enum ClassificationType {

    /**
     * 共享
     */
    SHARE("1"),

    /**
     * 不共享
     */
    NOT_SHARE("0");

    private final String classificationType;

    public static ClassificationType getClassificationType(String str) {
        for (ClassificationType value : values()) {
            if (StringUtils.contains(str, value.getClassificationType())) {
                return value;
            }
        }
        throw new RuntimeException("'ClassificationType' not found By " + str);
    }
}
